﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.IO;

namespace SmartVoice
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {

        public static bool OptIn()
        {
            try
            {
                StreamReader SR;
                string S;
                SR = File.OpenText("optIn.txt");
                S = SR.ReadLine();
                while (S != null)
                {
                    if (S.Equals("1")) return true;
                    else return false;
                }
                SR.Close();
            }
            catch (Exception) {}
            return false;
        }

        [System.STAThread()]
        [PreEmptive.Attributes.Setup(CustomEndpoint = "so-s.info/PreEmptive.Web.Services.Messaging/MessagingServiceV2.asmx")]
        [PreEmptive.Attributes.Teardown()]
        public static void Main()
        {
            OptIn();
            SmartVoice.App app = new SmartVoice.App();
            app.InitializeComponent();
            app.Run();
        }
    }
}
